package com.sctvcloud.bazhong.beans;

import android.support.annotation.NonNull;
import android.text.TextUtils;

import com.ruihang.generalibrary.ui.util.IListData;
import com.ruihang.generalibrary.utils.IDataDate;
import com.sctvcloud.bazhong.ui.util.IListShowData;

import java.sql.Date;
import java.util.List;

/**
 * Created by rh008 on 2017/7/18.
 */

public class LiveDynamic implements ILiveDy {
    private List<ImageInfo> dynamicImage;
    private String dynamicText;
    private String pubTime;//发布时间

    private int viewType;
    private int dataMode;
    private Date dateTemp;
    private boolean isLiving = false;

    private boolean hasCheckImages;//是否已经检查过图片链接的非空

    @Override
    public String getDataTitle() {
        return dynamicText;
    }

    @Override
    public String getDataImg() {
        return null;
    }

    @Override
    public String getDataTag() {
        return null;
    }

    @Override
    public String getDataId() {
        return null;
    }

    @Override
    public int getDataType() {
        return dataMode;
    }

    @Override
    public int getDataViewType() {
        return viewType;
    }

    @Override
    public IListData getOwner() {
        return null;
    }

    @Override
    public Date getDataDate() {
        return dateTemp;
    }

    @Override
    public void setDataDate(Date date) {
        dateTemp = date;
    }

    @NonNull
    @Override
    public String getDatePattern() {
        return "yyyy-MM-dd HH:mm:ss";
    }

    @Override
    public String getDateString() {
        return pubTime;
    }

    public String getDynamicId() {
        return null;
    }

    public String getContentText() {
        return dynamicText;
    }

    @Override
    public String getDyVideoUrl() {
        return null;
    }

    public void setContentText(String contentText) {
        this.dynamicText = contentText;
    }

    public String getPubTime() {
        return pubTime;
    }

    public void setPubTime(String pubTime) {
        if (!TextUtils.equals(this.pubTime, pubTime)) {
            dateTemp = null;
        }
        this.pubTime = pubTime;
    }

    public List<ImageInfo> getContentImage() {
        return dynamicImage;
    }

    public void setContentImage(List<ImageInfo> contentImage) {
        this.dynamicImage = contentImage;
    }

    public int getViewType() {
        return viewType;
    }

    public void setViewType(int viewType) {
        this.viewType = viewType;
    }

    public int getDataMode() {
        return dataMode;
    }

    public void setDataMode(int dataMode) {
        this.dataMode = dataMode;
    }

    @Override
    public String getTime() {
        return pubTime;
    }

    @Override
    public IListShowData getOwenerData() {
        return null;
    }

    public boolean isHasCheckImages() {
        return hasCheckImages;
    }

    public void setHasCheckImages(boolean hasCheckImages) {
        this.hasCheckImages = hasCheckImages;
    }
}
